package com.lantosec.hmrp.modules.notify.vo;


import java.util.Date;
import java.util.List;
import java.util.Map;

import com.lantosec.hmrp.modules.notify.entity.NotifyAttachment;
import com.lantosec.hmrp.modules.notify.entity.NotifyInfo;
import com.lantosec.hmrp.core.mvc.BaseVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * <p>
 * 通知 VO对象
 * </p>
 *
 * @author AutoCode
 * @since 2020-05-22
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value="NotifyInfo对象", description="通知")
public class NotifyInfoVO extends BaseVO<NotifyInfo> {
    private static final long serialVersionUID = 1L;


    public NotifyInfoVO(NotifyInfo entity){
        this.notifyId = entity.getNotifyId();
        this.notifyTypeId = entity.getNotifyTypeId();
        this.title = entity.getTitle();
        this.description = entity.getDescription();
        this.smsTag = entity.getSmsTag();
        this.publicTag = entity.getPublicTag();
        this.scheduleTag = entity.getScheduleTag();
        this.sendTime = entity.getSendTime();
        this.senderId = entity.getSenderId();
        this.sender = entity.getSender();
    }

    @Override
    public NotifyInfo convertToEntity(){
        return new NotifyInfo(this);
    }


    @ApiModelProperty(value = "系统通知ID")
    private String notifyId;

    @ApiModelProperty(value = "通知类型")
    private String notifyTypeId;

    @ApiModelProperty(value = "标题")
    private String title;

    @ApiModelProperty(value = "描述")
    private String description;

    @ApiModelProperty(value = "发送短信标识")
    private Integer smsTag;

    @ApiModelProperty(value = "公示信息标记")
    private Integer publicTag;

    @ApiModelProperty(value = "定时发送计划")
    private Integer scheduleTag;

    @ApiModelProperty(value = "发送时间")
    private Date sendTime;

    @ApiModelProperty(value = "发送人ID")
    private String senderId;

    @ApiModelProperty(value = "发送人")
    private String sender;

    @ApiModelProperty(value = "接受人ID")
    private String recipientId;
    @ApiModelProperty(value = "接受人")
    private String recipient;
    @ApiModelProperty(value = "已读标识")
    private Integer readFlag;
    @ApiModelProperty(value = "通知内容")
    private String content;
    @ApiModelProperty(value = "通知附件列表")
    private List<NotifyAttachment> notifyAttachmentList;
    @ApiModelProperty(value = "选择发送的对象（1部门，2岗位，3人员）")
    private Integer mesType;
    @ApiModelProperty(value = "通知分类名称")
    private String notifyType;
    @ApiModelProperty(value = "通知已读未读人数")
    private Map<String, Object> map;
}
